\section{Family.mui}

Family class is the base class for objects that are able
to handle a list of children. This is e.g. the case for
MUIs Menustrip, Menu and Menuitem objects.

Family class defines methods and attributes to
add and remove children, sort children, and transfer
children to other Family objects.

Group class and application class should also be a
subclass of Family class, but due to BOOPSI system
limitations, this is currently impossible. If the
future will allow more logical class trees, things
might change, but everything will be done in a
compatible manner.

\subsection[MUIM\_Family\_AddHead]{MUIM\_Family\_AddHead (V8)}

\subsubsection*{SYNOPSIS}
DoMethod(obj,MUIM\_Family\_AddHead,Object $\ast$obj);

\subsubsection*{FUNCTION}
Add an object as first object to the family.
Subclasses of family class usually define which
types of objects are possible within their family.

\subsubsection*{INPUTS}
\begin{description}
\item[obj] - the object to be added.
\end{description}

\subsubsection*{SEE ALSO}
MUIM\_Family\_AddTail, MUIM\_Family\_Insert,
MUIM\_Family\_Remove, MUIA\_Family\_Child

\subsection[MUIM\_Family\_AddTail]{MUIM\_Family\_AddTail (V8)}

\subsubsection*{SYNOPSIS}
DoMethod(obj,MUIM\_Family\_AddTail,Object $\ast$obj);

\subsubsection*{FUNCTION}
Add an object as last object to the family.
Subclasses of family class usually define which
types of objects are possible within their family.

This method does the same as OM\_ADDMEMBER.

\subsubsection*{INPUTS}
\begin{description}
\item[obj] - the object to be added.
\end{description}

\subsubsection*{SEE ALSO}
MUIM\_Family\_AddHead, MUIM\_Family\_Insert,
MUIM\_Family\_Remove, MUIA\_Family\_Child

\subsection[MUIM\_Family\_Insert]{MUIM\_Family\_Insert (V8)}

\subsubsection*{SYNOPSIS}
DoMethod(obj,MUIM\_Family\_Insert,Object $\ast$obj, Object $\ast$pred);

\subsubsection*{FUNCTION}
Add an object after another object to the family.
Subclasses of family class usually define which
types of objects are possible within their family.

\subsubsection*{INPUTS}
\begin{description}
\item[obj]  - the object to be added.
\item[pred] - the new object is inserted $\ast$after$\ast$ this
object. pred must of course be a member
of the family.
\end{description}

\subsubsection*{SEE ALSO}
MUIM\_Family\_AddTail, MUIM\_Family\_AddHead,
MUIM\_Family\_Remove, MUIA\_Family\_Child

\subsection[MUIM\_Family\_Remove]{MUIM\_Family\_Remove (V8)}

\subsubsection*{SYNOPSIS}
DoMethod(obj,MUIM\_Family\_Remove,Object $\ast$obj);

\subsubsection*{FUNCTION}
Remove an object from a family.

This method does the same as OM\_REMMEMBER.

\subsubsection*{INPUTS}
\begin{description}
\item[obj] - the object to be removed.
\end{description}


\subsubsection*{SEE ALSO}
MUIM\_Family\_AddTail, MUIM\_Family\_Insert,
MUIM\_Family\_AddHead, MUIA\_Family\_Child

\subsection[MUIM\_Family\_Sort]{MUIM\_Family\_Sort (V8)}

\subsubsection*{SYNOPSIS}
DoMethod(obj,MUIM\_Family\_Sort,Object $\ast$obj[1]);

\subsubsection*{FUNCTION}
Sort the children of a family.

\subsubsection*{INPUTS}
\begin{description}
\item[child] - array that contains $\ast$all$\ast$ the children of the
family in the desired order. The array must be
terminated with a NULL entry.
\end{description}

\subsubsection*{SEE ALSO}
MUIA\_Family\_Child

\subsection[MUIM\_Family\_Transfer]{MUIM\_Family\_Transfer (V8)}

\subsubsection*{SYNOPSIS}
DoMethod(obj,MUIM\_Family\_Transfer,Object $\ast$family);

\subsubsection*{FUNCTION}
All the children of the family are removed and
added to another family in the same order.

\subsubsection*{INPUTS}
\begin{description}
\item[family] - the destination family.
\end{description}

\subsubsection*{SEE ALSO}
MUIA\_Family\_Child

\subsection[MUIA\_Family\_Child]{MUIA\_Family\_Child -- (V8) [I..], Object $\ast$}

\subsubsection*{FUNCTION}
You supply a pointer to a previously created MUI object
here. This object will be added to family at family
creation time.

Of course you can specify any number of child objects,
limited only by available memory.

Normally, the value for a MUIA\_Family\_Child tag is
a direct call to another MUI\_NewObject(), children
are generated ''on the fly''.

When a family is disposed, all of its children will also
get deleted. If you supply a NULL pointer as child,
the family object will fail and previously dispose all
valid children found in the taglist.

This behaviour makes it possible to generate a complete
family within one single (but long) MUI\_NewObject()
call. Error checking is not necessary since every error,
even if it occurs in a very deep nesting level, will
cause the complete call to fail without leaving back
any previously created object.

\subsubsection*{NOTE}
As a special case, MUIA\_Group\_Child is also recognized
and treated as MUIA\_Family\_Child.

\subsubsection*{SEE ALSO}
MUIM\_Family\_AddTail, MUIM\_Family\_Insert,
MUIM\_Family\_AddHead, MUIA\_Family\_Remove



